
#include <appcall.h>
#include <kernel/syslog.h>
#include <stdint.h>


static volatile char test_align_array[64] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17};

struct align_test {
	uint32_t a;
	uint32_t b;
};

static int my_app_main(int argc, char *argv[])
{
	(void)argc;
	(void)argv;
	int i;
	volatile uint32_t val;

	volatile struct align_test *test = (struct align_test *)&test_align_array[3];

	val = test->b;

	pl_early_syslog_info("0x%x\r\n", val);
	pl_early_syslog_info("test is a test\r\n");
	pl_early_syslog_info("argc:%d\r\n", argc);

	for (i = 0; i < argc; i++)
		pl_early_syslog_info("argv[%d]:%s\r\n", i, argv[i]);

	for (volatile int j = 0; j < 35; j++)
		;

	pl_early_syslog_info("enter while (1)\r\n");
	while(1);

	return -5;
}
pl_app_register(my_app_main, "app_test");
